package com.ruoyi.hyg.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hyg.mapper.ExamIntroMapper;
import com.ruoyi.hyg.domain.ExamIntro;
import com.ruoyi.hyg.service.IExamIntroService;

/**
 * 考试前沿Service业务层处理
 *
 * @author ruoyi
 * @date 2025-08-13
 */
@Service
public class ExamIntroServiceImpl implements IExamIntroService
{
    @Autowired
    private ExamIntroMapper examIntroMapper;
    
    /**
     * 查询考试前沿
     *
     * @param id 考试前沿主键
     * @return 考试前沿
     */
    @Override
    public ExamIntro selectExamIntroById(Long id)
    {
        return examIntroMapper.selectExamIntroById(id);
    }
    
    /**
     * 查询考试前沿列表
     *
     * @param examIntro 考试前沿
     * @return 考试前沿
     */
    @Override
    public List<ExamIntro> selectExamIntroList(ExamIntro examIntro)
    {
        return examIntroMapper.selectExamIntroList(examIntro);
    }
    
    /**
     * 新增考试前沿
     *
     * @param examIntro 考试前沿
     * @return 结果
     */
    @Override
    public int insertExamIntro(ExamIntro examIntro)
    {
        examIntro.setCreateTime(DateUtils.getNowDate());
        return examIntroMapper.insertExamIntro(examIntro);
    }
    
    /**
     * 修改考试前沿
     *
     * @param examIntro 考试前沿
     * @return 结果
     */
    @Override
    public int updateExamIntro(ExamIntro examIntro)
    {
        return examIntroMapper.updateExamIntro(examIntro);
    }
    
    /**
     * 批量删除考试前沿
     *
     * @param ids 需要删除的考试前沿主键
     * @return 结果
     */
    @Override
    public int deleteExamIntroByIds(Long[] ids)
    {
        return examIntroMapper.deleteExamIntroByIds(ids);
    }
    
    /**
     * 删除考试前沿信息
     *
     * @param id 考试前沿主键
     * @return 结果
     */
    @Override
    public int deleteExamIntroById(Long id)
    {
        return examIntroMapper.deleteExamIntroById(id);
    }
}
